package com.stupidzhe.vbreview.bean;

import java.util.*;

/**
 * 记录Sub中变量、程序结构
 */
public class SubBodyInfo {

    public Map<Integer, Integer> loopStatics = new HashMap<>(10);
    public Map<Integer, Integer> switchStatics = new HashMap<>(10);

    private Map<TYPE, Integer> params = new HashMap<>(5);

    private List<LOOP> loops = new LinkedList<>();

    private List<IF> ifs = new LinkedList<>();

    public Map<TYPE, Integer> getParams() {
        return params;
    }

    public void setParams(Map<TYPE, Integer> params) {
        this.params = params;
    }

    public List<LOOP> getLoops() {
        return loops;
    }

    public void setLoops(List<LOOP> loops) {
        this.loops = loops;
    }

    public List<IF> getIfs() {
        return ifs;
    }

    public void setIfs(List<IF> ifs) {
        this.ifs = ifs;
    }

    public class IF {
        // 嵌套
        public int deep;
        public IF father;
        public TSWITCH type;
        public List<IF> iff = new LinkedList<>();
    }

    public class LOOP {
        // 嵌套
        public int deep;
        public LOOP father;
        public TLOOP type;
        public List<LOOP> loops = new LinkedList<>();
    }
}
